home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / examples / yafr_121 / part01 next >
Encoding:
Internet Message Format  |  1990-07-08  |  47.3 KB

  1. Path: xanth!cs.odu.edu!Amiga-Request
  2. From: Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v90i204: YAFR 1.21 - yet another file requester, Part01/02
  5. Message-ID: <13082@xanth.cs.odu.edu>
  6. Date: 8 Jul 90 16:03:52 GMT
  7. Sender: tadguy@cs.odu.edu
  8. Reply-To: davids@ucscb.UCSC.EDU (Dave Schreiber)
  9. Lines: 1690
  10. Approved: tadguy@cs.odu.edu (Tad Guy)
  11. X-Mail-Submissions-To: Amiga@cs.odu.edu
  12. X-Post-Discussions-To: comp.sys.amiga
  13.  
  14. Submitted-by: davids@ucscb.UCSC.EDU (Dave Schreiber)
  15. Posting-number: Volume 90, Issue 204
  16. Archive-name: examples/yafr-1.21/part01
  17.  
  18. [ uuencoded executable and object module included  ...tad ]
  19.  
  20. [ This is version 1.21 of YAFR, an update to version 1.15 posted in March.
  21.   The documentation lists this a 1.20, but the source says 1.21.  ...tad ]
  22.  
  23.  
  24. #!/bin/sh
  25. # This is a shell archive.  Remove anything before this line, then unpack
  26. # it by saving it into a file and typing "sh file".  To overwrite existing
  27. # files, type "sh file -c".  You can also feed this as standard input via
  28. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  29. # will see the following message at the end:
  30. #        "End of archive 1 (of 2)."
  31. # Contents:  README WdwDefs.h YAFR.o.uu pattern.h yafrHead.h yftest.c
  32. # Wrapped by tadguy@xanth on Sun Jul  8 12:03:39 1990
  33. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  34. if test -f 'README' -a "${1}" != "-c" ; then 
  35.   echo shar: Will not clobber existing file \"'README'\"
  36. else
  37. echo shar: Extracting \"'README'\" \(1163 characters\)
  38. sed "s/^X//" >'README' <<'END_OF_FILE'
  39. X                               YAFR V1.20
  40. X                           by Dave Schreiber
  41. X
  42. XYAFR V1.20 Copyright (c)1989,1990 by Dave Schreiber. All rights reserved.
  43. XYAFR is freely distributable, and may be sold as part of a commercial
  44. Xprogram. This copyright message must be included in the documentation
  45. Xfor any program, commercial or otherwise, that uses YAFR. Use of YAFR
  46. Xin a rogram does not detract in any way from the ownership of YAFR by
  47. Xits author, Dave Schreiber, nor does it change its status as a freely
  48. Xdistributable program.  Dave Schreiber reserves the right to forbid any
  49. Xperson or company from incorporating YAFR as part of a program owned by
  50. Xthat person or company.
  51. X
  52. XWhew!  Now, enough of legalize.  I'd appreciate hearing from you if you
  53. Xuse YAFR in a program that you write, but it isn't a requirement.
  54. XInstructions for compiling YAFR and using it in other programs is in
  55. Xthe source code, YAFR.c.  The program yftest is a small demo of the
  56. Xfile requestor.  Enjoy.
  57. X
  58. X-Dave Schreiber
  59. Xdavids@slugmail.ucsc.edu (prefered, but flakey.  If it doesn't work, try
  60. Xdavids@ucscb.ucsc.edu (during the school year) or
  61. Xdavids@cup.portal.com (all other times).)
  62. X
  63. END_OF_FILE
  64. if test 1163 -ne `wc -c <'README'`; then
  65.     echo shar: \"'README'\" unpacked with wrong size!
  66. fi
  67. # end of 'README'
  68. fi
  69. if test -f 'WdwDefs.h' -a "${1}" != "-c" ; then 
  70.   echo shar: Will not clobber existing file \"'WdwDefs.h'\"
  71. else
  72. echo shar: Extracting \"'WdwDefs.h'\" \(9615 characters\)
  73. sed "s/^X//" >'WdwDefs.h' <<'END_OF_FILE'
  74. X
  75. Xstruct Window *FNWindow = NULL;
  76. X#define Rp FNWindow->RPort
  77. XUBYTE DIRUNDOBUFFER[150];
  78. XUBYTE FNUNDOBUFFER[33];
  79. XUBYTE EXTUNDOBUFFER[150];
  80. X
  81. Xstruct PropInfo SliderSInfo = {
  82. X   AUTOKNOB+FREEVERT,
  83. X   -1,661,
  84. X   655,655
  85. X};
  86. X
  87. Xstruct Image Image1 = {
  88. X   0,1,
  89. X   15,4,
  90. X   0,
  91. X   NULL,
  92. X   0x0000,0x0000,
  93. X   NULL
  94. X};
  95. X
  96. Xstruct Gadget Slider = {
  97. X   NULL,
  98. X   217,35,
  99. X   23,110,
  100. X   NULL,
  101. X   FOLLOWMOUSE,
  102. X   PROPGADGET,
  103. X   (APTR)&Image1,
  104. X   NULL,
  105. X   NULL,
  106. X   NULL,
  107. X   (APTR)&SliderSInfo,
  108. X   16,
  109. X   NULL
  110. X};
  111. X
  112. XUSHORT chip ImageData2[] = {
  113. X   0xFFFF,0xFFFF,0xFFFE,0xC000,0x0000,0x0006,0xC006,0x0007,
  114. X   0x0006,0xC000,0x000D,0x8006,0xC00E,0x1F0C,0x0F06,0xC006,
  115. X   0x199E,0x1986,0xC006,0x198C,0x1986,0xC606,0x198C,0x1986,
  116. X   0xC60F,0x199E,0x0F06,0xC000,0x0000,0x0006,0xFFFF,0xFFFF,
  117. X   0xFFFE
  118. X};
  119. X
  120. Xstruct Image Image2 = {
  121. X   0,0,
  122. X   47,11,
  123. X   2,
  124. X   ImageData2,
  125. X   0x0001,0x0000,
  126. X   NULL
  127. X};
  128. X
  129. XUSHORT chip ImageData3[] = {
  130. X   0x1FFF,0xFFFF,0xFFF0,0xC000,0x0000,0x0006,0xC006,0x0007,
  131. X   0x0006,0xC000,0x000C,0x0006,0xC00E,0x0700,0x0F06,0xC006,
  132. X   0x181E,0x1986,0xC006,0x0180,0x1986,0xC600,0x198C,0x1986,
  133. X   0xC60F,0x199E,0x0006,0xC000,0x0000,0x0006,0x1FFF,0xFFFF,
  134. X   0xFFF0,0xE000,0x0000,0x000E,0x1E00,0x0000,0x00F0,0x01F0,
  135. X   0x0000,0x1F00,0x000F,0x8003,0xE000,0x0000,0x783C,0x0000,
  136. X   0x0000,0x07C0,0x0000,0x0000,0x783C,0x0000,0x000F,0x8003,
  137. X   0xE000,0x01F0,0x0000,0x1F00,0x1E00,0x0000,0x00F0,0xE000,
  138. X   0x0000,0x000E
  139. X};
  140. X
  141. Xstruct Image Image3 = {
  142. X   0,0,
  143. X   47,11,
  144. X   2,
  145. X   ImageData3,
  146. X   0x0003,0x0000,
  147. X   NULL
  148. X};
  149. X
  150. Xstruct Gadget Info = {
  151. X   &Slider,
  152. X   165,11,
  153. X   47,11,
  154. X   GADGHIMAGE+GADGIMAGE,
  155. X   GADGIMMEDIATE+TOGGLESELECT,
  156. X   BOOLGADGET,
  157. X   (APTR)&Image2,
  158. X   (APTR)&Image3,
  159. X   NULL,
  160. X   NULL,
  161. X   NULL,
  162. X   18,
  163. X   NULL
  164. X};
  165. X
  166. XUBYTE filenameSIBuff[33];
  167. Xstruct StringInfo filenameSInfo = {
  168. X   filenameSIBuff,
  169. X   FNUNDOBUFFER,
  170. X   0,
  171. X   33,
  172. X   0,
  173. X   0,0,0,0,0,
  174. X   0,
  175. X   0,
  176. X   NULL
  177. X};
  178. X
  179. XSHORT BorderVectors1[] = {
  180. X   0,0,
  181. X   217,0,
  182. X   217,10,
  183. X   0,10,
  184. X   0,0
  185. X};
  186. Xstruct Border Border1 = {
  187. X   -2,-1,
  188. X   1,0,JAM2,
  189. X   5,
  190. X   BorderVectors1,
  191. X   NULL
  192. X};
  193. X
  194. Xstruct Gadget filename = {
  195. X   &Info,
  196. X   86,159,
  197. X   214,9,
  198. X   NULL,
  199. X   RELVERIFY,
  200. X   STRGADGET,
  201. X   (APTR)&Border1,
  202. X   NULL,
  203. X   NULL,
  204. X   NULL,
  205. X   (APTR)&filenameSInfo,
  206. X   12,
  207. X   NULL
  208. X};
  209. X
  210. XUBYTE ExtNameSIBuff[150];
  211. Xstruct StringInfo ExtNameSInfo = {
  212. X   ExtNameSIBuff,
  213. X   EXTUNDOBUFFER,
  214. X   0,
  215. X   150,
  216. X   0,
  217. X   0,0,0,0,0,
  218. X   0,
  219. X   0,
  220. X   NULL
  221. X};
  222. X
  223. XSHORT BorderVectors2[] = {
  224. X   0,0,
  225. X   155,0,
  226. X   155,10,
  227. X   0,10,
  228. X   0,0
  229. X};
  230. Xstruct Border Border2 = {
  231. X   -2,-1,
  232. X   1,0,JAM2,
  233. X   5,
  234. X   BorderVectors2,
  235. X   NULL
  236. X};
  237. X
  238. Xstruct Gadget ExtName = {
  239. X   &filename,
  240. X   86,147,
  241. X   152,9,
  242. X   NULL,
  243. X   RELVERIFY,
  244. X   STRGADGET,
  245. X   (APTR)&Border2,
  246. X   NULL,
  247. X   NULL,
  248. X   NULL,
  249. X   (APTR)&ExtNameSInfo,
  250. X   18,
  251. X   NULL
  252. X};
  253. X
  254. XSHORT BorderVectors3[] = {
  255. X   0,0,
  256. X   89,0,
  257. X   89,12,
  258. X   0,12,
  259. X   0,1
  260. X};
  261. Xstruct Border Border3 = {
  262. X   -1,-1,
  263. X   1,0,JAM2,
  264. X   5,
  265. X   BorderVectors3,
  266. X   NULL
  267. X};
  268. X
  269. Xstruct IntuiText IText23 = {
  270. X   1,0,JAM2,
  271. X   37,2,
  272. X   NULL,
  273. X   "Ok",
  274. X   NULL
  275. X};
  276. X
  277. Xstruct Gadget ok = {
  278. X   &ExtName,
  279. X   6,172,
  280. X   88,11,
  281. X   NULL,
  282. X   RELVERIFY,
  283. X   BOOLGADGET,
  284. X   (APTR)&Border3,
  285. X   NULL,
  286. X   &IText23,
  287. X   NULL,
  288. X   NULL,
  289. X   13,
  290. X   NULL
  291. X};
  292. X
  293. XSHORT BorderVectors4[] = {
  294. X   0,0,
  295. X   84,0,
  296. X   84,10,
  297. X   0,10,
  298. X   0,1
  299. X};
  300. Xstruct Border Border4 = {
  301. X   -1,-1,
  302. X   1,0,JAM2,
  303. X   5,
  304. X   BorderVectors4,
  305. X   NULL
  306. X};
  307. X
  308. Xstruct IntuiText IText24 = {
  309. X   1,0,JAM2,
  310. X   19,1,
  311. X   NULL,
  312. X   "Parent",
  313. X   NULL
  314. X};
  315. X
  316. Xstruct Gadget parent = {
  317. X   &ok,
  318. X   218,12,
  319. X   83,9,
  320. X   NULL,
  321. X   RELVERIFY,
  322. X   BOOLGADGET,
  323. X   (APTR)&Border4,
  324. X   NULL,
  325. X   &IText24,
  326. X   NULL,
  327. X   NULL,
  328. X   15,
  329. X   NULL
  330. X};
  331. X
  332. XSHORT BorderVectors5[] = {
  333. X   0,0,
  334. X   89,0,
  335. X   89,12,
  336. X   0,12,
  337. X   0,1
  338. X};
  339. Xstruct Border Border5 = {
  340. X   -1,-1,
  341. X   1,0,JAM2,
  342. X   5,
  343. X   BorderVectors5,
  344. X   NULL
  345. X};
  346. X
  347. Xstruct IntuiText IText25 = {
  348. X   1,0,JAM2,
  349. X   21,2,
  350. X   NULL,
  351. X   "Cancel",
  352. X   NULL
  353. X};
  354. X
  355. Xstruct Gadget cancel = {
  356. X   &parent,
  357. X   213,172,
  358. X   88,11,
  359. X   NULL,
  360. X   RELVERIFY,
  361. X   BOOLGADGET,
  362. X   (APTR)&Border5,
  363. X   NULL,
  364. X   &IText25,
  365. X   NULL,
  366. X   NULL,
  367. X   14,
  368. X   NULL
  369. X};
  370. X
  371. XSHORT BorderVectors6[] = {
  372. X   0,0,
  373. X   57,0,
  374. X   57,10,
  375. X   0,10,
  376. X   0,1
  377. X};
  378. Xstruct Border Border6 = {
  379. X   -1,-1,
  380. X   1,0,JAM2,
  381. X   5,
  382. X   BorderVectors6,
  383. X   NULL
  384. X};
  385. X
  386. Xstruct IntuiText IText26 = {
  387. X   1,0,JAM2,
  388. X   10,1,
  389. X   NULL,
  390. X   "PIPE:",
  391. X   NULL
  392. X};
  393. X
  394. Xstruct Gadget pipe = {
  395. X   &cancel,
  396. X   245,147,
  397. X   56,9,
  398. X   NULL,
  399. X   RELVERIFY,
  400. X   BOOLGADGET,
  401. X   (APTR)&Border6,
  402. X   NULL,
  403. X   &IText26,
  404. X   NULL,
  405. X   NULL,
  406. X   10,
  407. X   NULL
  408. X};
  409. X
  410. XSHORT BorderVectors7[] = {
  411. X   0,0,
  412. X   57,0,
  413. X   57,10,
  414. X   0,10,
  415. X   0,1
  416. X};
  417. Xstruct Border Border7 = {
  418. X   -1,-1,
  419. X   1,0,JAM2,
  420. X   5,
  421. X   BorderVectors7,
  422. X   NULL
  423. X};
  424. X
  425. Xstruct IntuiText IText27 = {
  426. X   1,0,JAM2,
  427. X   13,1,
  428. X   NULL,
  429. X   "    ",
  430. X   NULL
  431. X};
  432. X
  433. Xstruct Gadget rad = {
  434. X   &pipe,
  435. X   245,135,
  436. X   56,9,
  437. X   NULL,
  438. X   RELVERIFY,
  439. X   BOOLGADGET,
  440. X   (APTR)&Border7,
  441. X   NULL,
  442. X   &IText27,
  443. X   NULL,
  444. X   NULL,
  445. X   9,
  446. X   NULL
  447. X};
  448. X
  449. XSHORT BorderVectors8[] = {
  450. X   0,0,
  451. X   57,0,
  452. X   57,10,
  453. X   0,10,
  454. X   0,1
  455. X};
  456. Xstruct Border Border8 = {
  457. X   -1,-1,
  458. X   1,0,JAM2,
  459. X   5,
  460. X   BorderVectors8,
  461. X   NULL
  462. X};
  463. X
  464. Xstruct IntuiText IText28 = {
  465. X   1,0,JAM2,
  466. X   13,1,
  467. X   NULL,
  468. X   "    ",
  469. X   NULL
  470. X};
  471. X
  472. Xstruct Gadget Ram = {
  473. X   &rad,
  474. X   245,124,
  475. X   56,9,
  476. X   NULL,
  477. X   RELVERIFY,
  478. X   BOOLGADGET,
  479. X   (APTR)&Border8,
  480. X   NULL,
  481. X   &IText28,
  482. X   NULL,
  483. X   NULL,
  484. X   8,
  485. X   NULL
  486. X};
  487. X
  488. XSHORT BorderVectors9[] = {
  489. X   0,0,
  490. X   57,0,
  491. X   57,10,
  492. X   0,10,
  493. X   0,1
  494. X};
  495. Xstruct Border Border9 = {
  496. X   -1,-1,
  497. X   1,0,JAM2,
  498. X   5,
  499. X   BorderVectors9,
  500. X   NULL
  501. X};
  502. X
  503. Xstruct IntuiText IText29 = {
  504. X   1,0,JAM2,
  505. X   13,1,
  506. X   NULL,
  507. X   "    ",
  508. X   NULL
  509. X};
  510. X
  511. Xstruct Gadget vdk = {
  512. X   &Ram,
  513. X   245,113,
  514. X   56,9,
  515. X   NULL,
  516. X   RELVERIFY,
  517. X   BOOLGADGET,
  518. X   (APTR)&Border9,
  519. X   NULL,
  520. X   &IText29,
  521. X   NULL,
  522. X   NULL,
  523. X   7,
  524. X   NULL
  525. X};
  526. X
  527. XSHORT BorderVectors10[] = {
  528. X   0,0,
  529. X   57,0,
  530. X   57,10,
  531. X   0,10,
  532. X   0,1
  533. X};
  534. Xstruct Border Border10 = {
  535. X   -1,-1,
  536. X   1,0,JAM2,
  537. X   5,
  538. X   BorderVectors10,
  539. X   NULL
  540. X};
  541. X
  542. Xstruct IntuiText IText30 = {
  543. X   1,0,JAM2,
  544. X   13,1,
  545. X   NULL,
  546. X   "    ",
  547. X   NULL
  548. X};
  549. X
  550. Xstruct Gadget vd0 = {
  551. X   &vdk,
  552. X   245,102,
  553. X   56,9,
  554. X   NULL,
  555. X   RELVERIFY,
  556. X   BOOLGADGET,
  557. X   (APTR)&Border10,
  558. X   NULL,
  559. X   &IText30,
  560. X   NULL,
  561. X   NULL,
  562. X   6,
  563. X   NULL
  564. X};
  565. X
  566. XSHORT BorderVectors11[] = {
  567. X   0,0,
  568. X   57,0,
  569. X   57,10,
  570. X   0,10,
  571. X   0,1
  572. X};
  573. Xstruct Border Border11 = {
  574. X   -1,-1,
  575. X   1,0,JAM2,
  576. X   5,
  577. X   BorderVectors11,
  578. X   NULL
  579. X};
  580. X
  581. Xstruct IntuiText IText31 = {
  582. X   1,0,JAM2,
  583. X   13,1,
  584. X   NULL,
  585. X   "    ",
  586. X   NULL
  587. X};
  588. X
  589. Xstruct Gadget dh2 = {
  590. X   &vd0,
  591. X   245,91,
  592. X   56,9,
  593. X   NULL,
  594. X   RELVERIFY,
  595. X   BOOLGADGET,
  596. X   (APTR)&Border11,
  597. X   NULL,
  598. X   &IText31,
  599. X   NULL,
  600. X   NULL,
  601. X   5,
  602. X   NULL
  603. X};
  604. X
  605. XSHORT BorderVectors12[] = {
  606. X   0,0,
  607. X   57,0,
  608. X   57,10,
  609. X   0,10,
  610. X   0,1
  611. X};
  612. Xstruct Border Border12 = {
  613. X   -1,-1,
  614. X   1,0,JAM2,
  615. X   5,
  616. X   BorderVectors12,
  617. X   NULL
  618. X};
  619. X
  620. Xstruct IntuiText IText32 = {
  621. X   1,0,JAM2,
  622. X   13,1,
  623. X   NULL,
  624. X   "    ",
  625. X   NULL
  626. X};
  627. X
  628. Xstruct Gadget dh1 = {
  629. X   &dh2,
  630. X   245,80,
  631. X   56,9,
  632. X   NULL,
  633. X   RELVERIFY,
  634. X   BOOLGADGET,
  635. X   (APTR)&Border12,
  636. X   NULL,
  637. X   &IText32,
  638. X   NULL,
  639. X   NULL,
  640. X   4,
  641. X   NULL
  642. X};
  643. X
  644. XSHORT BorderVectors13[] = {
  645. X   0,0,
  646. X   57,0,
  647. X   57,10,
  648. X   0,10,
  649. X   0,1
  650. X};
  651. Xstruct Border Border13 = {
  652. X   -1,-1,
  653. X   1,0,JAM2,
  654. X   5,
  655. X   BorderVectors13,
  656. X   NULL
  657. X};
  658. X
  659. Xstruct IntuiText IText33 = {
  660. X   1,0,JAM2,
  661. X   13,1,
  662. X   NULL,
  663. X   "    ",
  664. X   NULL
  665. X};
  666. X
  667. Xstruct Gadget df2 = {
  668. X   &dh1,
  669. X   245,58,
  670. X   56,9,
  671. X   NULL,
  672. X   RELVERIFY,
  673. X   BOOLGADGET,
  674. X   (APTR)&Border13,
  675. X   NULL,
  676. X   &IText33,
  677. X   NULL,
  678. X   NULL,
  679. X   2,
  680. X   NULL
  681. X};
  682. X
  683. XSHORT BorderVectors14[] = {
  684. X   0,0,
  685. X   57,0,
  686. X   57,10,
  687. X   0,10,
  688. X   0,1
  689. X};
  690. Xstruct Border Border14 = {
  691. X   -1,-1,
  692. X   1,0,JAM2,
  693. X   5,
  694. X   BorderVectors14,
  695. X   NULL
  696. X};
  697. X
  698. Xstruct IntuiText IText34 = {
  699. X   1,0,JAM2,
  700. X   13,1,
  701. X   NULL,
  702. X   "    ",
  703. X   NULL
  704. X};
  705. X
  706. Xstruct Gadget dh0 = {
  707. X   &df2,
  708. X   245,69,
  709. X   56,9,
  710. X   NULL,
  711. X   RELVERIFY,
  712. X   BOOLGADGET,
  713. X   (APTR)&Border14,
  714. X   NULL,
  715. X   &IText34,
  716. X   NULL,
  717. X   NULL,
  718. X   3,
  719. X   NULL
  720. X};
  721. X
  722. XSHORT BorderVectors15[] = {
  723. X   0,0,
  724. X   57,0,
  725. X   57,10,
  726. X   0,10,
  727. X   0,1
  728. X};
  729. Xstruct Border Border15 = {
  730. X   -1,-1,
  731. X   1,0,JAM2,
  732. X   5,
  733. X   BorderVectors15,
  734. X   NULL
  735. X};
  736. X
  737. Xstruct IntuiText IText35 = {
  738. X   1,0,JAM2,
  739. X   13,1,
  740. X   NULL,
  741. X   "    ",
  742. X   NULL
  743. X};
  744. X
  745. Xstruct Gadget df1 = {
  746. X   &dh0,
  747. X   245,47,
  748. X   56,9,
  749. X   NULL,
  750. X   RELVERIFY,
  751. X   BOOLGADGET,
  752. X   (APTR)&Border15,
  753. X   NULL,
  754. X   &IText35,
  755. X   NULL,
  756. X   NULL,
  757. X   1,
  758. X   NULL
  759. X};
  760. X
  761. XSHORT BorderVectors16[] = {
  762. X   0,0,
  763. X   57,0,
  764. X   57,10,
  765. X   0,10,
  766. X   0,1
  767. X};
  768. Xstruct Border Border16 = {
  769. X   -1,-1,
  770. X   1,0,JAM2,
  771. X   5,
  772. X   BorderVectors16,
  773. X   NULL
  774. X};
  775. X
  776. Xstruct IntuiText IText36 = {
  777. X   1,0,JAM2,
  778. X   13,1,
  779. X   NULL,
  780. X   "    ",
  781. X   NULL
  782. X};
  783. X
  784. Xstruct Gadget df0 = {
  785. X   &df1,
  786. X   245,36,
  787. X   56,9,
  788. X   NULL,
  789. X   RELVERIFY,
  790. X   BOOLGADGET,
  791. X   (APTR)&Border16,
  792. X   NULL,
  793. X   &IText36,
  794. X   NULL,
  795. X   NULL,
  796. X   0,
  797. X   NULL
  798. X};
  799. X
  800. XSHORT BorderVectors17[] = {
  801. X   0,0,
  802. X   207,0,
  803. X   207,109,
  804. X   0,109,
  805. X   0,0
  806. X};
  807. Xstruct Border Border17 = {
  808. X   -2,-1,
  809. X   1,0,JAM2,
  810. X   5,
  811. X   BorderVectors17,
  812. X   NULL
  813. X};
  814. X
  815. Xstruct Gadget filenamebox = {
  816. X   &df0,
  817. X   6,36,
  818. X   204,108,
  819. X   GADGHBOX+GADGHIMAGE,
  820. X   GADGIMMEDIATE,
  821. X   BOOLGADGET,
  822. X   (APTR)&Border17,
  823. X   NULL,
  824. X   NULL,
  825. X   NULL,
  826. X   NULL,
  827. X   17,
  828. X   NULL
  829. X};
  830. X
  831. XUBYTE DirNameSIBuff[150];
  832. Xstruct StringInfo DirNameSInfo = {
  833. X   DirNameSIBuff,
  834. X   DIRUNDOBUFFER,
  835. X   0,
  836. X   150,
  837. X   0,
  838. X   0,0,0,0,0,
  839. X   0,
  840. X   0,
  841. X   NULL
  842. X};
  843. X
  844. XSHORT BorderVectors18[] = {
  845. X   0,0,
  846. X   297,0,
  847. X   297,10,
  848. X   0,10,
  849. X   0,0
  850. X};
  851. Xstruct Border Border18 = {
  852. X   -2,-1,
  853. X   1,0,JAM2,
  854. X   5,
  855. X   BorderVectors18,
  856. X   NULL
  857. X};
  858. X
  859. Xstruct Gadget DirName = {
  860. X   &filenamebox,
  861. X   6,24,
  862. X   294,9,
  863. X   NULL,
  864. X   RELVERIFY,
  865. X   STRGADGET,
  866. X   (APTR)&Border18,
  867. X   NULL,
  868. X   NULL,
  869. X   NULL,
  870. X   (APTR)&DirNameSInfo,
  871. X   11,
  872. X   NULL
  873. X};
  874. X
  875. X#define GadgetList2 DirName
  876. X
  877. Xstruct NewWindow NewFNWindow = {
  878. X   6,9,
  879. X   307,187,
  880. X   0,1,
  881. X   MOUSEMOVE+GADGETDOWN+GADGETUP+DISKINSERTED+DISKREMOVED+RMBTRAP,
  882. X   WINDOWDRAG+ACTIVATE,
  883. X   &DirName,
  884. X   NULL,
  885. X   "Enter filename",
  886. X   NULL,
  887. X   NULL,
  888. X   5,5,
  889. X   640,200,
  890. X   WBENCHSCREEN
  891. X};
  892. END_OF_FILE
  893. if test 9615 -ne `wc -c <'WdwDefs.h'`; then
  894.     echo shar: \"'WdwDefs.h'\" unpacked with wrong size!
  895. fi
  896. # end of 'WdwDefs.h'
  897. fi
  898. if test -f 'YAFR.o.uu' -a "${1}" != "-c" ; then 
  899.   echo shar: Will not clobber existing file \"'YAFR.o.uu'\"
  900. else
  901. echo shar: Extracting \"'YAFR.o.uu'\" \(19332 characters\)
  902. sed "s/^X//" >'YAFR.o.uu' <<'END_OF_FILE'
  903. Xbegin 664 YAFR.o
  904. XM```#YP````)90492+F,``````^D```8D3E7__+_L``!E````+P<N+0`(+P=.0
  905. XMN@``6$\K0/_\2H!F#DAX__](;`.V3KH``%!/0J<O!R\M__Q.N@``("W__"XMX
  906. XM__A.74YUO^P``&4````O"R9O``@O"TZZ``!83R9?3G6_[```90```$CG`1`FS
  907. XM;P`,?@%*$V<@$!-(@`1``"AG!E-`9P9@#%)'8`A31V8$(`M@!E*+8-QP`$S?8
  908. XM"(!.=4Y5_^"_[```90```$CG!Q`F;0`(0JW_^'X`($M*&&;\4XB1RR`(4H`[]
  909. XM0/_P(@MF!G``8``"JC`M__!(P'(&3KH``"\`80#_&EA/*T#__!`;&T#_[V<`I
  910. XM`C(;4__N$@!(@01!`"-G``"P54%G``%65T%G&%-!9P`"7`1!`!9G``$P!$$`E
  911. XM/6=H8``!3A`M_^YR?+`!9P`"/G(IL`%G``(V(`?!_``&(&W__!&\``4(!"!+1
  912. XM+P@K2/_J80#_"EA/)D`@"V<``A!"&R`'P?P`!B\M_^HO0``480#_*EA/(&W_Z
  913. XM_"(O`!`A@!@`9@`!FF```>80+?_N<GRP`6<``=IR*;`!9P`!TB`'P?P`!B!MF
  914. XM__P1O``!"`1@``%N$"W_[G(CL`%G``&R<GRP`6<``:IR*;`!9P`!HDH`9P`!G
  915. XMG"('P_P`!B!M__P1O``"&`02`$B!!$$`)6<``3!506<04T%G``$F!$$`%V<`,
  916. XM`1Y@!!M;_^Y21R`'<@;!P2!M__Q",`@$(`?!P4AX``(O0``480#]UEA/(&W_[
  917. XM_"(O`!`A@!@`(`?!_``&('`(`!"M_^Y2BV```-8@!\'\``8@;?_\$;P``P@$C
  918. XM8```PB`'P?P`!B!M__P1O``$"`1@``"N(`?!_``&(&W__$(P"`0@2TH89OQ3Q
  919. XMB)'+(`A4@"H`(`5(P"\`80#]9%A/($`0K?_O?`$K0/_F2A-G+!`32(!(P"\`Y
  920. XM2&P(S$ZZ``!03TJ`9A9P)[`39@)2BR`&4D8@;?_F$9L``�(&W_YD(P8``@$
  921. XM!\'\``8B!DC!4H$O`2]``!1A`/T((&W__"(O`!0A@!@`(&W_YB)`$MAF_"!`-
  922. XM+HA.N@``+JW_YF$`_2I83U)'8`#]R"`'4D?!_``&(&W__!&\``8(!"`'2,!RV
  923. XM!DZZ```O`&$`_+A83R('2,$O0``0<`9.N@``(&W__")O`!!@`A+84X!D^B!O=
  924. XM`!`K2/_X+RW__&$`_-`@+?_X3.T(X/_03EU.=4Y5__B_[```90```$CG`S`F2
  925. XM;0`()&T`#"!M`!!*&&;\4XB1[0`0(`A2@"P`(&T`$$H89OQ3B)'M`!`@"%*`&
  926. XM+P!A`/PV6$]^`"M`__B^1FQ"+RW_^"\+(&T`%$Z04$]*0&<<+RT`$"\*80`!Z
  927. XM+E!/2D!G#"\M__AA`/Q(<`%@'B!M`!`B;?_X$YAP`"M(`!!21V"Z+RW_^&$`9
  928. XM_"AP`$SM#,#_Z$Y=3G5.5?_\O^P``&4```!(YP`P)FT`""1M``PK2__\7(L@K
  929. XM;?_\$"@`!$B`#$``!V0``++00#`[``9.^P`$``P`I`"D`%0`I`!^`*0O"B\+$
  930. XM80`!>%!/2D!G!G`!8```CB)M__P@44H89OQ3B)'1+P@O$2\*3KH``$_O``Q*7
  931. XM@&9D(FW__"!12AAF_%.(D=$@"-7`8+@O"B\+80`!,%!/2D!G!'`!8$92BDH2#
  932. XM9N@0*P`$<@:P`6<$4P!F*G`!8"XO"B\+80`!!E!/2D!G!'`!8!Q(>O\R+PHOZ
  933. XM"R!M__PO$&$`_GY@""\*+PMA```,3.T,`/_T3EU.=;_L``!E````2.<`,"9OA
  934. XM``PD;P`0(`IF!G``8```LA`K``1R!K`!9P``G'(!L`%G``"4$@!(@0Q!``9DC
  935. XM``""TD$R.Q`&3OL0!``*`'0`.@!(`'0`7"!32AAF_%.(D=,O""\3+PI.N@``U
  936. XM3^\`#$J`9P1P`&!:(%-*&&;\4XB1TR`(U<!@.ER++PHO"V$`_H)03V`\2A)7?
  937. XMP$0`2(!(P%**2H!G''``8"A!ZP`&2'H`*"\*+P@O$V$`_;)/[P`08!!<BV``8
  938. XM_UQ*$F8$<`%@`G``3-\,`$YUO^P``&4```!(YP`P)F\`#"1O`!`@"F8$<`!@U
  939. XM/B`+9SAP!K`K``1G,"\*+PMA`/[^4$]*0&<$<`%@(!`K``1R`;`!9PA=`&<$C
  940. XM7(M@[G`!L"L`!&;(7(M@Q'``3-\,`$YU3E7_8+_L``!E````2.<',"9M``@D?
  941. XM;0`,/BT`&CPM`!XZ+0`J<`$K0/_\2BT`,V<.,"P`C@!``(`Y0`".8`8Y?``&>
  942. XM`(XY10*:.6T`+@*<2'C__B\*3KH``%!/*T#_^"!M`!!*$&8,0>P(U")M`!`2\
  943. XMV&;\(&T`$$/M_V(2V&;\2&W_8F$`^<A83RE``_(@2D/L`@02V&;\(&T`$$/LH
  944. XM`6X2V&;\($M#[`%-$MAF_"`'.4`(F"`&.4`(FBEM`"`(LB!M`"0I2`BV(`AG/
  945. XM!'`/8`)P`3E`",9P`"\`+P!A``PV2&P(F$ZZ``!/[P`,*4```$J`9@XO+?_XN
  946. XM3KH``'``8``!IDAL"-A(>/__+RP``$ZZ``!(>``!(&P``"\H`#).N@``2'@`2
  947. XM$TAX``8@;```+R@`,DZZ``!(>``)2&P)`B!L```O*``R3KH``$AX`)I(>``&[
  948. XM(&P``"\H`#).N@``2'@`!TAL"0P@;```+R@`,DZZ``!/[P!$2'@`I4AX``8@7
  949. XM;```+R@`,DZZ``!(>``(2&P)%"!L```O*``R3KH``$*7+RP``$AL!_Q.N@``F
  950. XM3^\`("\M__AA``#Z6$\K0/_\4X!F/B\M__A.N@``2'@``4*G+RP``$AL!_Q.U
  951. XMN@``2'C__DAL`@1.N@``0I<O+```2&P`]BM`__A.N@``3^\`)&"P+RW_^$ZZ.
  952. XM``!83TJM__QG``"&0>P!32)+$MAF_$'L`@0B2A+89OQ![`%N(FT`$!+89OQ*V
  953. XMK0`49UY![`($(FT`%!+89OP@2DH89OQ3B)'*<#HB"+`R&/]G,"!*2AAF_%.(Y
  954. XMD<H@"&<B($I*&&;\4XB1RG`O(@BP,AC_9PY(;`D>+RT`%$ZZ``!03TAL`4TO*
  955. XM+0`43KH``%!/+RP``$ZZ``!A``QL("W__$SM#.#_3$Y=3G5.5?_4O^P``&4`0
  956. XM``!(YP\R)FT`"'@`D<@K2/_D*TC_Z$AM_^1A``@06$]*`&8&<`!@``(B0FP`<
  957. XM"$AL`"Y(;``$2'@``6$``X!A``)<2'@`!4AL"2!(;`($3KH``$_O`!A*@&<`Q
  958. XM`7P@"V<``78@;?_P+P@O"TZZ``!(;?_D80`'N$_O``Q*`&8&<`!@``'((&W_8
  959. XM\"\(+PM.N@``4$\N`"`'2H!G``#\(&W_\%"(+PAA``=H6$]*0&8,(&W_\"`H,
  960. XM``1*@&\6(&W_\%"(+PAA``&06$]*@&<$<@%@`G(`+`$@!DJ`9T9P"KA`9"@@;
  961. XM;?_P(@121,+`<"W2@"\!2'@`"")L```O*0`R+PAA``@P3^\`$&`84D1P`#`$I
  962. XM2&P`+DAL``0O`&$``J)/[P`,<``P!$AM_^0O`&$``MQ03RH`<`:Z@&="<`2Z2
  963. XM@&8H2&P"!&$``:!(>``!0J<O+```2&P'_$ZZ```NK?_D80`(M'`!8```YG`$4
  964. XMNH!LM"\M_^1A``B@(`5@``#22H9G`/\&2&W_Y&$`!J983TH`9@#^]G``8```U
  965. XMMB)M__`@:0$(E<HA2@$$(&W_\"QM_^0B;@$$L\AF%"M*__0K2O_L*TK_Z"!M(
  966. XM_^0A2@$$2'@!$"\M__!.N@``4$\B;```(&D`5G``$"@`#W(!X:$O`4ZZ``!8_
  967. XM3W``,`1(;?_D+P!A``(,4$\J`'`&NH!GSG`$NH!F+$AL`@1A``#06$]*`&<>X
  968. XM2'@``4*G+RP``$AL!_Q.N@``+JW_Y&$`!]YP`6`0<`2Z@&RP+RW_Y&$`!\P@&
  969. XM!4SM3/#_N$Y=3G6_[```90```"\+)F\`"#`L`(X(```'9@1P`6`H($M*&&;\1
  970. XM4XB1RR`((DO3P%N)0>P))A`9L!AF!$H`9O96P$0`2(!(P"9?3G6_[```90``B
  971. XM`$*G(&P``"\H`#).N@``2'@`C4AX`-!(>``G2'@`""!L```O*``R3KH``$AXO
  972. XM``$@;```+R@`,DZZ``!/[P`D3G6_[```90```$CG`Q`F;P`02A-F$$'L"2PB1
  973. XM2Q+89OQP`6```+!^`'P!2C-X`&<82H9G%'(OLC-X`%?`1`!(@$C`+`!2AV#B"
  974. XM2H9G$$AL"2XO"TZZ``!03W`!8'@@2TH89OQ3B)'+<#HB"+`S&/]F!'``8&!\F
  975. XM`"!+2AAF_%.(D<L@""X`4X=*AVLZ<"^P,W@`9AY*AV<&L#-X_V8(<``7@'@!0
  976. XM8`9P`!>`>`!^`'P!8!!P.K`S>`!F"$(S>`%^`'P!4X=@PDJ&9@I![`DP(DL2-
  977. XMV&;\<`%,WPC`3G5.5?_\O^P``&4```!(YP$P/B\`&B9O`!PD;P`@<``P!R]`P
  978. XM``P@/``)__8B+P`,3KH``#=```A"IR\L```O"DZZ``!,[0R`__!.74YU3E7_3
  979. XM2+_L``!E````2.<',#XM``HF;0`,(&P``"\H`%9.N@``6$\K0/_V2H!G``,.<
  980. XM($`K:``<__([:``@_^([:``B_^`K:``4_^X[:``8_^0K:``D_^HK:``H_^8OI
  981. XM`$ZZ``!83R`M_^YR$)"!9R1R$)"!9P`!>G(@D(%G.`2```!_P&<``4($@```O
  982. XM@`!G``%,8(9P"KY`8X!P`#`L``AR`#('+PLO`2\`80`"GD_O``Q@`/]F(&W_I
  983. XM\@QH``H`)F)V(&@`&DAX``5(;`DZ+R@`#$ZZ``!/[P`,2H!G+B)M__(@:0`:#
  984. XM+R@`#&$`"AQ![`,J0^P"!!+89OQ(;`E`2&P"!$ZZ``!/[P`,8!0B;?_R(&D`+
  985. XM&B)H``Q%[`($%-EF_$AX``%"IR\L``!(;`?\3KH``'`!8``""B!M__(P*``F3
  986. XM!$``"VU\#$``"&QVT$`P.P`&3OL`!`!D`!0`%``.`!H`:@!J`"!P`&```=9P[
  987. XM`V```=!P!&```<H0+`%N2@!F(D'L"4)#[`%N,M!"$4AX``%"IR\L``!(;`%J?
  988. XM3KH``$_O`!!![`%N0^W_2A+89OQ(;?]*80#QVEA/*4`#\G`!8``!@'`%8``!.
  989. XM>B\\``"``"\L``!A``2`<`5@``%F+SP``0``+RP``&$`!&QP!6```5)P$B!MP
  990. XM__*P:``F9@9P`6```4!(>``%2&P)1DAL`@1.N@``3^\`#$J`9P#^`#`M_^!(T
  991. XMP'(FD(%R"DZZ```J`'P`*VL`$/_\O`5G%$JM__QG#B!M__PK:`$$__Q2!F#H2
  992. XM2JW__&<`_<8@;?_\("@`!$J`;W1#[`($)$E*&F;\4XJ5R7`Z0^P"`R(*L#$8#
  993. XM`&<R0^P"!"1)2AIF_%.*E<EP+T/L`@,B"K`Q&`!G%A`L`@1*`&<.2&P)3$ALO
  994. XM`@1.N@``4$\@;?_\4(@O"$AL`@1.N@``2'@``4*G+RP``$AL!_Q.N@``<`%@;
  995. XM:D/H``A![`%-$!BP&68F2@!F]F8@+RW_YB\M_^HO+`DV+RP),DZZ``!/[P`0-
  996. XM2H!G!'`#8#8@;?_\4(A#[`%-$MAF_$AX``%"IR\L``!(;`#V3KH``$_O`!`I5
  997. XM;?_J"3(I;?_F"39@`/S><`9,[0S@_S1.74YUO^P``&4```!(YR<0/B\`&CPOI
  998. XM`!XF;P`@<``P!W(`,@9T"I*"4H!.N@``2$!(P"H`<``P+`E.L(5G"B\++P5AB
  999. XM```04$\@!3E`"4Y,WPCD3G6_[```90```$CG!S`^+P`:)F\`'$I'9Q)\`"1K!
  1000. XM``2\1V0,)&H!!%)&8/0D:P`$)TH`$'P`>BUP"KQ`9"P@"F<H<``P!2\`2'@``
  1001. XM""!L```O*``R+PIA``$Z3^\`$%)&!D4`"B1J`01@SDS?#.!.=;_L``!E````8
  1002. XM+PLF;P`(+PLO+`/R80#TQ%!/)E].=;_L``!E````+PLF;P`()VL`#``(+SP`9
  1003. XM`0`!2'@!$$ZZ``!03R=```Q*@&8,+P!A``&V6$]P`&!D2I-F""!K``PFB&!61
  1004. XM2JL`!&8H(%,B:P`,)TD`$"=)``@G20`$(4D!!"!3(FL`#"\)+PAA```T4$]@]
  1005. XM*"!K``@B:P`,+PDO"&$``"!03R!K``@B:P`,(4D!!"!K``PA:P`(`0AP`29?H
  1006. XM3G6_[```90```$CG`#`F;P`,)&\`$"23)6L`!``$)6L`=`!T)6L`>`!X)6L`-
  1007. XM?`!\)6L`@`"`0>H`"$/K``@0V6;\0>H`D$/K`)`0V6;\)6L`A`"$)6L`B`"(X
  1008. XM)6L`C`",3-\,`$YU3E7_U+_L``!E````2.<',"9M``@D;0`,/BT`$CPM`!9!#
  1009. XMZP`(0^W_UA+89OP@*P`$2H!O('``,"P"G"\`+PI.N@``2&P)4$AM_]9.N@``E
  1010. XM3^\`$&`0<``P+`*:+P`O"DZZ``!03W``,`=R`#(&+P$O`"\*3KH``$AX`!E('
  1011. XM;`E8+PI.N@``<``P!W(`,@8N@2\`+PI.N@``3^\`($'K``@B2$H99OQ3B9/(V
  1012. XM(`ER&;"!;A)!ZP`((DA*&6;\4XF3R"`)8`(@`2H`0>L`"'``,`4O`"\(+PI.;
  1013. XMN@``3.T,X/_`3EU.=4Y5__B_[```90```$CG`#`F;0`()&L!!$AX`1`O"TZZ7
  1014. XM``!03R!**TC_^"`(9Q(D:`$$2'@!$"\(3KH``%!/8.1,WPP`3EU.=4Y5_\"_>
  1015. XM[```90```$CG/S(F;0`(+BT`#'P`(&P``"MH`"+__"!M__P@*``8Y8`@0"(HB
  1016. XM``3E@4/L!S@K0/_X*T'_]"M)__!P"KP`9'1*K?_T9VX@;?_T2J@`!&962J@`M
  1017. XM"&=0+PAA``(&6$]*`&=$(&W_]"\H`"A(;?_#80`!KDAL"7)(;?_#3KH``$_OM
  1018. XM`!`B;?_P(&D`&D7M_\,L:``,'-IF_%(&*VW_\/_H(&W_\"M0__`@;?_T(!#E>
  1019. XM@"M`__1@AB`+9Q!"IR!L```O*``R3KH``%!/*@8,AP`!``!G``"02JP(R&<`S
  1020. XM`(@K;`C(_^Q*K?_P9WH@;?_L(FW_\+/(9VY#[`,4L<EG9B`+9@@$:`$```Q@F
  1021. XM4#`H``1(P#(H``9(P30H``1(PC8H``A(P]2#4X(V*``&2,,X*``*2,36A%.#Y
  1022. XM+P,O`B\!+P`@;```+R@`,DZZ``!"ER\++RW_[$ZZ``!/[P`<(&W_["M0_^Q@9
  1023. XM@"EM__`(R`R'``"``&=:<`J\`&14(&W_\$IH``QG"B`\```!`$J`9D`B;?_P-
  1024. XM(&D`&D7L"70L:``,'-IF_"`+9@P@;?_P!F@!```,8!!"IR\++RW_\$ZZ``!/2
  1025. XM[P`,4@8@;?_P*U#_\&"F(`MG%G``$`4O`$*G+PM(;`<X3KH``$_O`!!,WTS\Z
  1026. XM3EU.=4Y5__R_[```90```$'L!S@K2/_\0>P#%")M__RSR&<.0FD`#"!M__PK>
  1027. XM4/_\8.9.74YUO^P``&4```!(YP<P)F\`&"XO`!P@!^6`)$!\`!P:<!2\@&X"M
  1028. XM(`8L`'H`NH9L"A`:%X!8`%*%8/)",U@`3-\,X$YU3E7_\+_L``!E````2.<!]
  1029. XM$"9M``A^`"\\``$``4AX`"1.N@``4$\K0/_V2H!F!G``8```VB\\``$``4AX.
  1030. XM`$1.N@``4$\K0/_R2H!F$DAX`"0O+?_V3KH``'``8```L'``+P`O`$ZZ``!0L
  1031. XM3RM`__QF'DAX`"0O+?_V3KH``$AX`$0O+?_R3KH``'``8```@"!M__(1?``%O
  1032. XM``A#Z``4(4D`"B)M__PA20`.(4@`%'`9(4``'"`M__8B`.2!(4$`*"%)`!@O$
  1033. XM""\K``A.N@``+JW__$ZZ```@;?_V#*A$3U,``!A7P$0`2(!(P"X`+JW__$ZZ[
  1034. XM``!(>``D+RW_]DZZ``!(>`!$+RW_\DZZ```@!TSM"(#_Z$Y=3G5.5?_\O^P`<
  1035. XM`&4```!(YP,P)FT`""1M``Q^`$HS<`!G#B!M`!`1LW``<`!21V#L(`=(P'(Z@
  1036. XM(&T`$+(P"/]G&B`'2,!R+[(P"/]G#DI'9PI*$F<&$8%P`%)'?`!*,F``9Q@@2
  1037. XM!TC`(@9(P="!(&T`$!&R8``(`%)&8.(@!TC`(@9(P="!(&T`$$(P"`!,WPS`R
  1038. XM3EU.=4Y5__2_[```90```$CG!P`N+0`(+SP``0``2'@!!$ZZ``!03RM`__9*O
  1039. XM@&8$<`!@9B\M__8O!TZZ```@;?_V4(A(;`*>2&P#*B\(80#_(D_O`!1\``Q&7
  1040. XM`(QL$D'L`IY#[`,J$[!@`&``4D9@Z"\'3KH``"H`+H=.N@``6$\N!4J'9P@O$
  1041. XM!V$`_WI83TAX`00O+?_V3KH``$SM`.#_Z$Y=3G6_[```90```$CG`Q`F;P`0+
  1042. XM?@`,1P",;!9P`$'L`IX1@'``0>P#*A&`<`!21V#D2'C__B\+3KH``%!/+`!*I
  1043. XMAF8$<`!@+"\&80#_&%A/?@`,1P",;!QP+T'L`RJP,'``9@Q![`,J$;P`.G``Q
  1044. XM8`121V#>3-\(P$YU```#^````%L````!```5=```%6P``!5,```5!@``%-@`Z
  1045. XM`!2P```4:```%%```!1(```4+@``$^8``!.>```2N```$H```!#X```0I```$
  1046. XM$)```!!*```01```$#8``!`R```0"@``$`8```_>```/V@``#[8```\:```.8
  1047. XM]@``#N(```ZJ```.I@``#I0```X^```..@``#@X```W>```-L```#2X```T"6
  1048. XM```,N```##P```P&```+X```"]````NT```+D```"W````LT```+,```"N0`A
  1049. XM``I>```*6@``"B````H<```*`@``"50```E````)/```"3@```CJ```(S@``<
  1050. XM"$(```@^```(*```""0```?X```']```!^8```?B```'T@``![H```>V```':
  1051. XMI@``!Y(```>.```'?@``!VH```=>```'5@``!T````<T```')@``!Q@```<0Q
  1052. XM```'"@``!P0```:\```&E@``!HX```:&```"N@```"T````"```8?```&'(`C
  1053. XM`!@^```8-@``%]H``!?6```7P```%[P``!*4```2=```$2P``!`D```/[@``&
  1054. XM#\P```^Z```/K@``#Z(```^2```/A@``#W8```\>```.S```#K8```Z8```.,
  1055. XMC```#BP```X2```.!@``#@(```L<```*3```"5@```C<```(C```"'H```AP:
  1056. XM```(9@``"#0```;Z```&\```!N0```;>```&H```!IH````H`````````^^&4
  1057. XM```"7U]B87-E```````=```8'```%X```!;N```5V```%9(``!5D```3;```3
  1058. XM$R0``!)"```1V@``$3H``!$<```0K@``$%X```T:```,S@``"_(```NJ```+8
  1059. XM8@``"0@```9:```%]@``!2(```0T```#C@```*8```!D````2@````:#```"=
  1060. XM7U]X8V]V9@`````=```8(```%X0``!;R```5W```%98``!5H```3<```$R@`S
  1061. XM`!)&```1W@``$3X``!$@```0L@``$&(```T>```,T@``"_8```NN```+9@``O
  1062. XM"0P```9>```%^@``!28```0X```#D@```*H```!H````3@````J#```"7VUA0
  1063. XM;&QO8P`````!````%H,```)?;&]N9VIM<`````$````L@P```E]S971M96T`X
  1064. XM`````0```#J#```"7V9R964````````!````6H,```)?7T-833(R``````,`N
  1065. XM``-8```#0@```."#```"7W-T<F-H<@`````!```"OH,```)?<W1R=7!R````/
  1066. XM``$```,6@P```U]S=')N:6-M<`````````4```\B```-Y@``"5P```6&```$,
  1067. XMH(,```)?3&]C:P````````,``!A0```(.```!JJ#```#7T]P96Y7:6YD;W<`7
  1068. XM`````0``!SB#```"7U5N3&]C:P`````$```7\@``"%@```@:```'3(,```1?X
  1069. XM4V5T5VEN9&]W5&ET;&5S`````0``!V*#```"7U-E=$%096X````&```4-@``'
  1070. XM$IP``!)\```+Z```"[P```=R@P```E]-;W9E````````!0``$M```!*P```':
  1071. XMV@``!ZX```>&@P```E]497AT````````!0``$Q(``!*^```'[@``!\(```>:^
  1072. XM@P``!%]!8W1I=F%T94=A9&=E=``````"```(2@``!_R#```$7U)E9G)E<VA'V
  1073. XM3&ES=`````````@``!50```0.@``#^(```ZN```.0@``"S@```IB```(+(,`V
  1074. XM``)?<W1R8V%T``````@``!/N```2B```#]````^^```.%@``#$(```CD```(G
  1075. XMUH,```-?0VQO<V57:6YD;W<````!```([H,```)?17AA;6EN90````(``!>R6
  1076. XM```)>(,```)?17A.97AT``````$```F:@P```E]&<F5E365M````"0``&`X`9
  1077. XM`!;:```6S@``%E@``!9,```6*```$U@``!,^```*WH,```)?5V%I=```````_
  1078. XM``$```KX@P```U]296-T1FEL;`````````(``!2X```+V(,```)?7T-81#,SV
  1079. XM``````(```\\```,^(,```1?4F5F<F5S:$=A9&=E=',``````0``#0B#```"@
  1080. XM7T=E=$US9P`````!```--H,```-?4F5P;'E-<V<````````!```-=(,```-?I
  1081. XM1&]U8FQE0VQI8VL````!```0#H,```)?7T-833,S``````$``!"$@P```U]!L
  1082. XM;&QO8TUE;0````````0``!>:```6$@``%?0``!%8A@```E]$3U-"87-E````@
  1083. XM`0``$X*#```#7T]N1V%D9V5T`````````0``%,2#```#7T]F9D=A9&=E=```I
  1084. XM`````0``%2J#```#7T-R96%T95!O<G0``````0``%CB#```"7U!U=$US9P``Q
  1085. XM```!```6G(,```-?5V%I=%!O<G0````````!```6I(,```-?1&5L971E4&]RV
  1086. XM=``````!```6PH,```-?4&%R96YT1&ER```````!```7Z@$```)?<V%L;&]C=
  1087. XM```````!```"7W-F<F5E``````!(`0``!%]#;VUP:6QE4&%T=&5R;@````"@J
  1088. XM`0``!%]-871C:%!A='1E<FX```````7T`0```U]'971&:6QE;F%M90``!E0!G
  1089. XM```"7T=E=$YA;64```D"`0```U]#:&5C:TEN9F\`````"V`!```$7T-L96%R0
  1090. XM1FEL94)O>```````"Z@!```#7U!A<F5N=&EZ90`````+\`$```1?57!D871ES
  1091. XM4VQI9&5R```````,R`$```5?0VAE8VM);G1U:4UE<W-A9V5S````#10!```#@
  1092. XM7U5P9&%T94QI<W0````07`$```-?4F5W<FET94QI<W0``!"L`0```U]#:&5C]
  1093. XM:T5X=```````$1H!```"7T=E=$9I8@```!$X`0```E]#;W!Y1DE"```1V`$`;
  1094. XM``1?4')I;G1&:6QE3F%M90`````2/`$```1?1G)E949U;F--96UO<GD````3]
  1095. XM'@$```5?4'5T1&5V:6-E<TEN1V%D9V5T<P``$V8!```$7U)E<V5T1V%D9V5TA
  1096. XM<P``````%5X!```"7V)S=')C<'D``!60`0```U])<T1/4T1I<VL`````%=(!L
  1097. XM```$7T1O<T-O;F-A=&5N871E````%N@!```#7U-E96M2;V]T```````7>@$`-
  1098. XM``-?36%K94%B<TYA;64``!@:`````````_(```/H`````E]?34521T5$```#`
  1099. XMZ@```E\```````7__P*5`H\"CP````````````````````$`#P`$````````;
  1100. XM``````````````#9`",`%P!N````"``#````&@````````````````````0`J
  1101. XM$````````````"\`"P`"``````$`````````````+P`+``(```!"`P``````.
  1102. XM````+@"E``L`+P`+``8!`@`!````6@```&X`````````````````$@``````\
  1103. XM``%-````E@```"$``````````````````````````````````````-D```#9W
  1104. XM``H````*`````/_^__\!``$%````T@````````""`%8`GP#6``D````!``0`#
  1105. XM``#F````````````````````K@`,`````````6X```"W````E@``````````<
  1106. XM````````````````````````````FP```)L`"@````H`````__[__P$``04`,
  1107. XM``%&`````````/8`5@"3`)@`"0````$`!````5H```````````````````$B*
  1108. XM`!(```````````!9````60`,````#`````'_____`0`!!0```98`````3VL`Q
  1109. XM``$``0``)0`"`````````;H````````!:@`&`*P`6``+`````0`!```!J@``1
  1110. XM``````&^````````````#0```````````%0```!4``H````*`````?____\!&
  1111. XM``$%```!_@````!087)E;G0```$``0``$P`!`````````B(````````!T@#:6
  1112. XM``P`4P`)`````0`!```"$@````````(J````````````#P```````````%D`2
  1113. XM``!9``P````,`````?____\!``$%```":@````!#86YC96P```$``0``%0`"`
  1114. XM`````````HX````````"/@#5`*P`6``+`````0`!```"?@````````*6````.
  1115. XM````````#@```````````#D````Y``H````*`````?____\!``$%```"U@``P
  1116. XM``!025!%.@`!``$```H``0````````+Z`````````JH`]0"3`#@`"0````$`G
  1117. XM`0```NH````````#``````````````H````````````Y````.0`*````"@```
  1118. XM``'_____`0`!!0```T``````("`@(````0`!```-``$````````#9```````^
  1119. XM``,4`/4`AP`X``D````!``$```-4`````````VH````````````)````````C
  1120. XM````.0```#D`"@````H````!_____P$``04```.J`````"`@("````$``0``Y
  1121. XM#0`!`````````\X````````#?@#U`'P`.``)`````0`!```#O@````````/4L
  1122. XM````````````"````````````#D````Y``H````*`````?____\!``$%```$6
  1123. XM%``````@("`@```!``$```T``0````````0X`````````^@`]0!Q`#@`"0``R
  1124. XM``$``0``!"@````````$/@````````````<````````````Y````.0`*````S
  1125. XM"@````'_____`0`!!0``!'X`````("`@(````0`!```-``$````````$H@``&
  1126. XM``````12`/4`9@`X``D````!``$```22````````!*@````````````&````\
  1127. XM````````.0```#D`"@````H````!_____P$``04```3H`````"`@("````$`W
  1128. XM`0``#0`!````````!0P````````$O`#U`%L`.``)`````0`!```$_```````S
  1129. XM``42````````````!0```````````#D````Y``H````*`````?____\!``$%F
  1130. XM```%4@`````@("`@```!``$```T``0````````5V````````!28`]0!0`#@`*
  1131. XM"0````$``0``!68````````%?`````````````0````````````Y````.0`*W
  1132. XM````"@````'_____`0`!!0``!;P`````("`@(````0`!```-``$````````%D
  1133. XMX`````````60`/4`.@`X``D````!``$```70````````!>8````````````"I
  1134. XM````````````.0```#D`"@````H````!_____P$``04```8F`````"`@("``V
  1135. XM``$``0``#0`!````````!DH````````%^@#U`$4`.``)`````0`!```&.@``<
  1136. XM``````90`````````````P```````````#D````Y``H````*`````?____\!=
  1137. XM``$%```&D``````@("`@```!``$```T``0````````:T````````!F0`]0`OT
  1138. XM`#@`"0````$``0``!J0````````&N@````````````$````````````Y````G
  1139. XM.0`*````"@````'_____`0`!!0``!OH`````("`@(````0`!```-``$`````A
  1140. XM```''@````````;.`/4`)``X``D````!``$```<.````````!R0`````````5
  1141. XM````````````````SP```,\`;0```&T`````__[__P$``04```=D````````E
  1142. XM!S@`!@`D`,P`;``#``(``0``!W@``````````````````````!$````````"Y
  1143. XM!`````````"6``````````````````````````````````````$I```!*0`*X
  1144. XM````"@````#__O__`0`!!0``!]@````````'B``&`!@!)@`)`````0`$```'4
  1145. XM[```````````````````![0`"P````!&:6QE('!A='1E<FX```$``0``!@"4L
  1146. XM````````""@`````?D9I;&5N86UE``$``0``!@"?````````"$H```@V1"%I4
  1147. XM<F5C=&]R>0```0`!```%``T````````(:```"%1%;G1E<B!F:6QE;F%M90``'
  1148. XM``8`"0$S`+L``0`"@'```!`"```'_`````````B(````````````!0`%`H``B
  1149. XMR``!`````"@I?",_)0``(S\``%E!1E(@5C$N,C$@J3$Y.#DL(#$Y.3`@8GD@'
  1150. XM1&%V92!38VAR96EB97(``$1I<F5C=&]R>0!0871T97)N`$9I;&5N86UE```O:
  1151. XM`%!)4$4Z`"YI;F9O`"\`+P``````````````4$E013H`.@`C/P``4$E013H`,
  1152. XM+P!U,"`@*&1I<BD`("`@("`@("`@("`@("`@("`@("`@("`@(``Z`"`@("``^
  1153. XM```````#[````&$````!```(L@``"*H```B$```(@```"&0```A@```(0@``O
  1154. XM"!X```@.```'_```!_0```>:```'B```!X````=2```'2@``!S@```<P```'8
  1155. XM%@``!N@```;@```&S@``!L8```:L```&?@``!G8```9D```&7```!D(```84J
  1156. XM```&#```!?H```7R```%V```!:H```6B```%D```!8@```5N```%0```!3@`2
  1157. XM``4F```%'@``!00```36```$S@``!+P```2T```$F@``!&P```1D```$4@``'
  1158. XM!$H```0P```$`@```_H```/H```#X````\8```.8```#D````WX```-V```#'
  1159. XM7````RX```,F```#%````PP```+R```"Q````KP```*J```"H@```H8```)8&
  1160. XM```"4````CX```(V```"&@```>P```'D```!T@```<H```&R```!C````7P`3
  1161. XM``%J```!8@```1@```$(````]@```.X```"8````E````((```!0````0```2
  1162. XM``8````"```'N```![0```$F```!(@```+(```"N`````@````,```!X````I
  1163. XM9`````````/O`0```U]&3E=I;F1O=P`````````!```#7U-L:61E<E-);F9OJ
  1164. XM````!`$```)?26UA9V4Q`````!H!```"7U-L:61E<@`````N`0```E]);6%GG
  1165. XM93(`````6@$```)?26UA9V4S`````&X!```"7TEN9F\```````""`0``!%]F1
  1166. XM:6QE;F%M95-);F9O``````"N`0``!%]";W)D97)696-T;W)S,0````#2`0``4
  1167. XM`E]";W)D97(Q````Y@$```-?9FEL96YA;64```````#V`0``!%]%>'1.86UE&
  1168. XM4TEN9F\```````$B`0``!%]";W)D97)696-T;W)S,@````%&`0```E]";W)D,
  1169. XM97(R```!6@$```)?17AT3F%M90```6H!```$7T)O<F1E<E9E8W1O<G,S````^
  1170. XM`98!```"7T)O<F1E<C,```&J`0```E])5&5X=#(S```!O@$```%?;VL````!E
  1171. XMT@$```1?0F]R9&5R5F5C=&]R<S0````!_@$```)?0F]R9&5R-````A(!```"X
  1172. XM7TE497AT,C0```(J`0```E]P87)E;G0````"/@$```1?0F]R9&5R5F5C=&]R`
  1173. XM<S4````":@$```)?0F]R9&5R-0```GX!```"7TE497AT,C4```*6`0```E]C=
  1174. XM86YC96P````"J@$```1?0F]R9&5R5F5C=&]R<S8````"U@$```)?0F]R9&5RE
  1175. XM-@```NH!```"7TE497AT,C8```,``0```E]P:7!E```````#%`$```1?0F]R+
  1176. XM9&5R5F5C=&]R<S<````#0`$```)?0F]R9&5R-P```U0!```"7TE497AT,C<`B
  1177. XM``-J`0```5]R860```-^`0``!%]";W)D97)696-T;W)S.`````.J`0```E]"W
  1178. XM;W)D97(X```#O@$```)?251E>'0R.````]0!```!7U)A;0```^@!```$7T)OG
  1179. XM<F1E<E9E8W1O<G,Y````!!0!```"7T)O<F1E<CD```0H`0```E])5&5X=#(Y$
  1180. XM```$/@$```%?=F1K```$4@$```1?0F]R9&5R5F5C=&]R<S$P```$?@$```-?L
  1181. XM0F]R9&5R,3````````22`0```E])5&5X=#,P```$J`$```%?=F0P```$O`$`@
  1182. XM``1?0F]R9&5R5F5C=&]R<S$Q```$Z`$```-?0F]R9&5R,3$```````3\`0``9
  1183. XM`E])5&5X=#,Q```%$@$```%?9&@R```%)@$```1?0F]R9&5R5F5C=&]R<S$R?
  1184. XM```%4@$```-?0F]R9&5R,3(```````5F`0```E])5&5X=#,R```%?`$```%?]
  1185. XM9&@Q```%D`$```1?0F]R9&5R5F5C=&]R<S$S```%O`$```-?0F]R9&5R,3,`$
  1186. XM``````70`0```E])5&5X=#,S```%Y@$```%?9&8R```%^@$```1?0F]R9&5R4
  1187. XM5F5C=&]R<S$T```&)@$```-?0F]R9&5R,30```````8Z`0```E])5&5X=#,T4
  1188. XM```&4`$```%?9&@P```&9`$```1?0F]R9&5R5F5C=&]R<S$U```&D`$```-?D
  1189. XM0F]R9&5R,34```````:D`0```E])5&5X=#,U```&N@$```%?9&8Q```&S@$`7
  1190. XM``1?0F]R9&5R5F5C=&]R<S$V```&^@$```-?0F]R9&5R,38```````<.`0``,
  1191. XM`E])5&5X=#,V```')`$```%?9&8P```'.`$```1?0F]R9&5R5F5C=&]R<S$W-
  1192. XM```'9`$```-?0F]R9&5R,3<```````=X`0```U]F:6QE;F%M96)O>```!X@!0
  1193. XM```$7T1I<DYA;65326YF;P``````![0!```$7T)O<F1E<E9E8W1O<G,Q.```N
  1194. XM!]@!```#7T)O<F1E<C$X```````'[`$```)?1&ER3F%M90``!_P!```"7TE4`
  1195. XM97AT,SD```@V`0```E])5&5X=#,X```(5`$```)?251E>'0S-P``"'0!```#,
  1196. XM7TYE=T9.5VEN9&]W```(F`$```1?1FER<W1$:7-A8FQE9``````(R```````)
  1197. XM``/R```#Z`````)?7TU%4D=%1````^L```#^```#[P$```1?1$E254Y$3T)5"
  1198. XM1D9%4@````````$```1?1DY53D1/0E5&1D52````````E@$```1?15A454Y$=
  1199. XM3T)51D9%4@``````MP$```1?9FEL96YA;65324)U9F8````!30$```1?17ATG
  1200. XM3F%M95-)0G5F9@`````!;@$```1?1&ER3F%M95-)0G5F9@`````"!`$```9?>
  1201. XM>6%F<E]E7T9I;&5N86UE4&5N0V]L;W(```*:`0``!E]Y869R7V5?1&ER;F%M*
  1202. XM95!E;D-O;&]R`````IP!```"7V%B<T1I<@````*>`0```U]A8G-$:7).86UEU
  1203. XM`````RH!```"7VQO=VUE;0````.V`0``!%]-87-T97)0871T97)N``````/R\
  1204. XM`````````_(```/H`````6-H:7!```/J````,O_______L``````!L`&``<`P
  1205. XM!L````V`!L`.'PP/!L`&&9X9AL`&&8P9AL8&&8P9AL8/&9X/!L``````!O__"
  1206. XM_____A______\,``````!L`&``<`!L````P`!L`.!P`/!L`&&!X9AL`&`8`96
  1207. XMAL8`&8P9AL8/&9X`!L``````!A______\.``````#AX`````\`'P```?```/.
  1208. XM@`/@````>#P`````!\``````>#P````/@`/@``'P```?`!X`````\.``````"
  1209. XM#@`````#[P$```-?26UA9V5$871A,@```````0```U]);6%G941A=&$S````E
  1210. X*`$(````````#\@-?9
  1211. X``
  1212. Xend
  1213. Xsize 13780
  1214. END_OF_FILE
  1215. if test 19332 -ne `wc -c <'YAFR.o.uu'`; then
  1216.     echo shar: \"'YAFR.o.uu'\" unpacked with wrong size!
  1217. fi
  1218. # end of 'YAFR.o.uu'
  1219. fi
  1220. if test -f 'pattern.h' -a "${1}" != "-c" ; then 
  1221.   echo shar: Will not clobber existing file \"'pattern.h'\"
  1222. else
  1223. echo shar: Extracting \"'pattern.h'\" \(10288 characters\)
  1224. sed "s/^X//" >'pattern.h' <<'END_OF_FILE'
  1225. X/* ====================================================================== */
  1226. X
  1227. X/* 
  1228. X            AmigaDOS Pattern Matching Demo
  1229. X                March 20, 1990
  1230. X
  1231. X                by Dave Haynie
  1232. X
  1233. X            Released to the Public Domain
  1234. X
  1235. X    This is the AmigaDOS Pattern Matcher I developed for DiskSalv 
  1236. X    V1.40.  So far, it seems to work just fine, and certainly works
  1237. X    better than any public domain code I managed to dig up, most
  1238. X    of which was limited to the '?' and '#' characters instead of
  1239. X    full AmigaDOS patterns.
  1240. X    
  1241. X    This will compile under Lattice V5.02 with the command:
  1242. X    
  1243. X            lc -L pattern.c
  1244. X            
  1245. X    The Lattice global optimizer seems to have trouble with it, at
  1246. X    least with the V5.02 system.
  1247. X
  1248. X    With the function prototypes removed, I suspect it would be a
  1249. X    simple port to the Manx V3.6a compiler.
  1250. X    
  1251. X    I'd certainly appreciate any feedback on this code, especially 
  1252. X    if there are any patterns it doesn't correctly match.  
  1253. X*/
  1254. X
  1255. X#include <exec/types.h>
  1256. X#include <string.h>
  1257. X#include <stdio.h>
  1258. X#include <setjmp.h>
  1259. X
  1260. X/* ====================================================================== */
  1261. X
  1262. X/* These are my allocator routines, slight variations on the C library
  1263. X   routines.  The pattern matching code was designed to use the DiskSalv
  1264. X   safe chunky allocator, and rather than re-write the code to use
  1265. X   something else, I provide some basically equivalent routines below.
  1266. X   The pattern compiler allocates string memory, and works best with a
  1267. X   memory allocator that can be cleaned up at program's end (eg, a plain
  1268. X   AllocMem() here isn't a good idea). */
  1269. X
  1270. Xjmp_buf        lowmem;        /* Don't forget to initialize this! */
  1271. X
  1272. X/* This is the basic safe allocator; it always returns a valid pointer.
  1273. X   The pattern matcher counts on the memory returned having been zeroed
  1274. X   out! */
  1275. X
  1276. Xchar *salloc(LONG size) {
  1277. X   char *ptr;
  1278. X   
  1279. X   if (!(ptr = (char *)malloc(size))) longjmp(lowmem,-1);
  1280. X   setmem(ptr,size,'\0');
  1281. X   return ptr;    
  1282. X}
  1283. X
  1284. X/* This is just for compatibility purposes. */
  1285. X
  1286. Xvoid sfree(char *ptr) {
  1287. X   free(ptr);
  1288. X}
  1289. X
  1290. X/* ====================================================================== */
  1291. X
  1292. X/* This is the definition of a pattern element.  The pattern compiler will
  1293. X   create an array of these elements from a string passed to it. */
  1294. X
  1295. Xtypedef struct {
  1296. X   char *aux;            /* Auxilary data; string or paren-count */
  1297. X   BYTE type;            /* Corresponding character type */
  1298. X} pattern;
  1299. X
  1300. X/* The types, for the "special" array. */
  1301. X
  1302. X#define pSTRING    0    /* Plain old string */
  1303. X#define pALT    1    /* The alternation character */
  1304. X#define pREP    2    /* The repeat character */
  1305. X#define pANY    3    /* The match-any character */
  1306. X#define pNULL    4    /* The match-null character */
  1307. X#define pSUB    5    /* A subpattern */
  1308. X#define pEND    6    /* End of the pattern. */
  1309. X
  1310. X/* This is the definition of a pattern matching function, for use in the
  1311. X   "MatchSub()" coroutine. */
  1312. X
  1313. Xtypedef BOOL (*patfunc)(pattern *, char *);
  1314. X
  1315. X/* ====================================================================== */
  1316. X
  1317. X/* This section contains the pattern compiler code. */
  1318. X
  1319. X/* This function takes in a string from which one parenthesis has been
  1320. X   stripped.  It returns a pointer to the position of the matching
  1321. X   parenthesis, or NULL if it isn't found. */
  1322. X
  1323. Xstatic char *FindParen(char *str) {
  1324. X   short parencnt = 1;
  1325. X   
  1326. X   while (*str) {
  1327. X      switch (*str) {
  1328. X         case '(' :
  1329. X            ++parencnt;
  1330. X            break;
  1331. X         case ')' :
  1332. X            if (--parencnt == 0) return str;
  1333. X            break;
  1334. X         default :
  1335. X            break;          
  1336. X      }
  1337. X      ++str;
  1338. X   }
  1339. X   return NULL;
  1340. X}
  1341. X
  1342. X/* This function creates a pattern for later pattern matching.  It checks
  1343. X   syntax as well, since we don't want invalid patterns to possibly crash 
  1344. X   the machine or otherwise cause trouble.  This is a destructive compile,
  1345. X   in that it trashes the input string. */
  1346. X        
  1347. Xpattern *CompilePattern(char *str) {
  1348. X   pattern *pat, *result = NULL;
  1349. X   short i = 0, j, tlen, plen = strlen(str)+1;
  1350. X   char  fch, nch, *sub, *tmp;
  1351. X
  1352. X   if (!str) return NULL;
  1353. X   
  1354. X   pat = (pattern *)salloc(sizeof(pattern)*plen);
  1355. X   while (fch = *str++) {
  1356. X      nch = *str;
  1357. X      switch (fch) {
  1358. X         case '(' :    /* The start of a group */
  1359. X            if (nch == '|' || nch == ')') goto fail;
  1360. X            pat[i].type = pSUB;
  1361. X            if (!(str = FindParen(sub = str))) goto fail;
  1362. X            *str++ = '\0';
  1363. X            if (!(pat[i].aux = (char *)CompilePattern(sub))) goto fail;
  1364. X            break;
  1365. X         case ')' :    /* We should never see the end of a group */
  1366. X            goto fail;
  1367. X         case '|' :    /* Alternation */
  1368. X            if (nch == '|' || nch == ')') goto fail;
  1369. X            pat[i].type = pALT;
  1370. X            break;
  1371. X         case '#' :    /* Repeatition */
  1372. X        if (nch == '#' || nch == '|' || nch == ')' || !nch) goto fail;
  1373. X        pat[i].type = pREP;
  1374. X        switch (nch) {
  1375. X           case '(' :
  1376. X           case '%' :
  1377. X           case '?' :
  1378. X              break;
  1379. X           case '\047':
  1380. X              nch = *str++;
  1381. X           default:
  1382. X                  pat[++i].type = pSTRING;
  1383. X                  pat[i].aux = (char *)salloc(2);
  1384. X                  pat[i].aux[0] = nch;
  1385. X              str++;
  1386. X              break;
  1387. X            }
  1388. X            break;
  1389. X         case '?' :    /* One of anything */
  1390. X            pat[i].type = pANY;
  1391. X            break;
  1392. X         case '%' :    /* One of nothing */
  1393. X            pat[i].type = pNULL;
  1394. X            break;
  1395. X         default:    /* Normal characters */
  1396. X            pat[i].type = pSTRING;
  1397. X            tmp = (char *)salloc((long)(tlen = strlen(str)+2));
  1398. X            tmp[0] = fch;
  1399. X            j = 1;
  1400. X            while (*str && !strchr("()|#?%",*str)) {
  1401. X               if (*str == '\047') ++str;
  1402. X               tmp[j++] = *str++;
  1403. X            }
  1404. X            tmp[j] = '\0';
  1405. X            strupr(strcpy(pat[i].aux = salloc(j+1),tmp));
  1406. X            sfree(tmp);
  1407. X            break;
  1408. X      }
  1409. X      ++i;
  1410. X   }
  1411. X   pat[i++].type = pEND;
  1412. X   result = (pattern *)memcpy(salloc(sizeof(pattern)*i),(char *)pat,sizeof(pattern)*i);
  1413. X
  1414. Xfail:
  1415. X   sfree((char *)pat);
  1416. X   return result;
  1417. X}
  1418. X
  1419. X/* ====================================================================== */
  1420. X
  1421. X/* This is the actual pattern matching code.  This code hasn't been really
  1422. X   optimized or anything; it's highly recursive, but it's designed to be
  1423. X   as nice to your stack as possible.  There are four coroutines in my 
  1424. X   pattern matcher.  The top-level routine "MatchPattern()" takes in a 
  1425. X   pattern and a string, and knows only how to subdivide an alternated 
  1426. X   pattern and pass that on the the single pattern matcher, "MatchOne()".  
  1427. X   That routine knows how to match strings, NULLs, and ANYs.  It calls 
  1428. X   "MatchRepeat()" to handle the repeat pattern, and "MatchSub()" to handle
  1429. X   a sub-pattern.  Similarly, the "MatchRepeat()" routine knows how to match
  1430. X   repeated strings, NULLs, and ANYs.  It also calls the "MatchSub()" routine
  1431. X   to handle repeated subpatterns.  The "MatchSub()" splits the input string
  1432. X   into strings for the subpattern and parent pattern to match, and works 
  1433. X   through these until a match is found or we've tried all possibilities.  
  1434. X   It calls "MatchPattern()" on a simple subpattern, or "MatchRepeat()" on a 
  1435. X   repeated subpattern. */
  1436. X
  1437. X/* Forward Declarations */
  1438. X
  1439. Xstatic BOOL MatchOne(pattern *, char *);
  1440. Xstatic BOOL MatchSub(pattern *, pattern *, char *, patfunc);
  1441. Xstatic BOOL MatchRepeat(pattern *, char *);
  1442. X       BOOL MatchPattern(pattern *, char *);
  1443. X
  1444. X/* This function matches a subpattern, where "sub" is the subpattern,
  1445. X   "pat" is the rest of the pattern at the current level, and "str"
  1446. X   is the usual string.  The string splitting uses dynamic allocation
  1447. X   to avoid stack overflows as much as possible, the "subob" function
  1448. X   is the particular pattern matching function to use on the subpattern. */
  1449. X
  1450. Xstatic BOOL MatchSub(pattern *sub, pattern *pat, char *str, patfunc subop) {
  1451. X   short pos, len = strlen(str)+1;
  1452. X   char *copy = salloc(strlen(str)+1);
  1453. X
  1454. X   for (pos = 0; pos < len; pos++) {
  1455. X      if ((*subop)(sub,copy) && MatchOne(pat,str)) {
  1456. X         sfree(copy);
  1457. X         return TRUE;
  1458. X      }
  1459. X      copy[pos] = *str++;
  1460. X   }
  1461. X   sfree(copy);
  1462. X   return FALSE;
  1463. X}
  1464. X
  1465. X/* This function matches a repeat pattern.  It returns the part of the
  1466. X   string not matched, or NULL if the whole string was matched. */
  1467. X
  1468. Xstatic BOOL MatchRepeat(pattern *pat, char *str) {
  1469. X   pattern *local = pat++;
  1470. X
  1471. X   switch (local->type) {
  1472. X      case pSTRING    :
  1473. X         while (TRUE) {
  1474. X            if (MatchPattern(pat,str)) return TRUE;
  1475. X            if (strnicmp(str,local->aux,strlen(local->aux))) break;
  1476. X            str += strlen(local->aux);
  1477. X         }
  1478. X         break;
  1479. X      case pANY    :
  1480. X         do {
  1481. X            if (MatchPattern(pat,str)) return TRUE;
  1482. X         } while (*++str);
  1483. X         if (pat[0].type == pEND || pat[0].type == pALT) return TRUE;
  1484. X         break;
  1485. X      case pNULL    :
  1486. X         break;
  1487. X      case pSUB    :
  1488. X         if (MatchPattern(pat,str)) return TRUE;
  1489. X         return MatchSub((pattern *)local->aux,pat,str,MatchRepeat);
  1490. X      case pEND    :
  1491. X         break;
  1492. X   }
  1493. X   return MatchOne(pat,str);
  1494. X}
  1495. X
  1496. X/* This function tries to match a single pattern against the given 
  1497. X   string.  It is up to the calling function to worry about alternation. */
  1498. X
  1499. Xstatic BOOL MatchOne(pattern *pat, char *str) {
  1500. X   if (!str) return FALSE;
  1501. X
  1502. X   while (pat->type != pEND && pat->type != pALT) {
  1503. X      switch (pat->type) {
  1504. X         case pSTRING:
  1505. X            if (strnicmp(str,pat->aux,strlen(pat->aux))) return FALSE;
  1506. X            str += strlen(pat->aux);
  1507. X            break;
  1508. X         case pREP    :
  1509. X            return MatchRepeat(++pat,str);
  1510. X         case pANY    :         
  1511. X            if (!*str++) return FALSE;
  1512. X            break;
  1513. X         case pNULL    :
  1514. X            break;
  1515. X         case pSUB    :
  1516. X            return MatchSub((pattern *)pat->aux,pat+1,str,MatchPattern);
  1517. X      }
  1518. X      ++pat;
  1519. X   }
  1520. X   if (!*str) return TRUE;
  1521. X   return FALSE;
  1522. X}
  1523. X
  1524. X/* This function matches a given string against a precompiled pattern.  The
  1525. X   main function here doesn't do any actual matching; it just subdivides
  1526. X   a pattern into individual items based on any alternation used. */
  1527. X
  1528. XBOOL MatchPattern(pattern *pat, char *str) {
  1529. X   if (!str) return FALSE;
  1530. X
  1531. X   while (pat && pat->type != pEND) {
  1532. X      if (MatchOne(pat,str)) return TRUE;
  1533. X
  1534. X      while (pat->type != pALT && pat->type != pEND) ++pat;
  1535. X      if (pat->type == pALT) ++pat;
  1536. X   } 
  1537. X   return FALSE;
  1538. X}
  1539. X
  1540. X/* ====================================================================== */
  1541. X
  1542. END_OF_FILE
  1543. if test 10288 -ne `wc -c <'pattern.h'`; then
  1544.     echo shar: \"'pattern.h'\" unpacked with wrong size!
  1545. fi
  1546. # end of 'pattern.h'
  1547. fi
  1548. if test -f 'yafrHead.h' -a "${1}" != "-c" ; then 
  1549.   echo shar: Will not clobber existing file \"'yafrHead.h'\"
  1550. else
  1551. echo shar: Extracting \"'yafrHead.h'\" \(1409 characters\)
  1552. sed "s/^X//" >'yafrHead.h' <<'END_OF_FILE'
  1553. X#include <exec/types.h>
  1554. X#include <exec/exec.h>
  1555. X#include <intuition/intuition.h>
  1556. X#include <libraries/dos.h>
  1557. X#include <libraries/dosextens.h>
  1558. X#include <dos.h>
  1559. X
  1560. X#include "WdwDefs.h"
  1561. X
  1562. Xextern struct IntuitionBase *IntuitionBase;
  1563. Xextern struct GfxBase *GfxBase;
  1564. Xextern struct DosLibrary *DOSBase;
  1565. X
  1566. X#define WORDROUND(xxx) (((long)xxx+3)>>2)<<2)   /* Round to word boundary */
  1567. X#define D_S(name, type) char c_##name[sizeof(type)+3]; \
  1568. X                        type *name = (type *)WORDROUND(c_##name);
  1569. X
  1570. X#define XBorder 8
  1571. X#define YBorder 45
  1572. X
  1573. X#define GN_CANCEL  0
  1574. X#define GN_NEWDIR  1
  1575. X#define GN_NEWDISK 2
  1576. X#define GN_OK      3
  1577. X#define GN_PARENT  4
  1578. X#define GN_RIEN    5
  1579. X#define GN_DONE    6
  1580. X
  1581. Xstruct fibNode
  1582. X   {
  1583. X   struct FileInfoBlock fib;
  1584. X   struct fibNode *next,*prev;
  1585. X   ULONG num;
  1586. X   };
  1587. X
  1588. Xstruct fibHeader
  1589. X   {
  1590. X   struct fibNode *directory,*first,*last,*current,*top;
  1591. X   ULONG curnum,firstnum;
  1592. X   };
  1593. X
  1594. XUSHORT yafr_e_FilenamePenColor,yafr_e_DirnamePenColor;
  1595. X
  1596. X#define MAXPATHSTRING 140
  1597. Xchar    absDir[MAXPATHSTRING];
  1598. Xchar    absDirName[MAXPATHSTRING];
  1599. X
  1600. Xstruct Gadget *FirstDisabled = NULL; /*The first ghosted gadget...*/
  1601. X
  1602. X
  1603. XBYTE IsDOSDisk();
  1604. Xvoid ResetGadgets();
  1605. Xvoid bstrcpy();
  1606. Xvoid ClearFileBox();
  1607. XBYTE Parentize();
  1608. Xvoid UpdateSlider();
  1609. Xvoid UpdateList();
  1610. Xvoid RewriteList();
  1611. XBYTE CheckExt();
  1612. XBYTE GetFib();
  1613. Xvoid CopyFIB();
  1614. Xvoid PrintFileName();
  1615. Xvoid RefreshGadget();
  1616. Xvoid FreeFuncMemory();
  1617. Xvoid PutDevicesInGadgets();
  1618. END_OF_FILE
  1619. if test 1409 -ne `wc -c <'yafrHead.h'`; then
  1620.     echo shar: \"'yafrHead.h'\" unpacked with wrong size!
  1621. fi
  1622. # end of 'yafrHead.h'
  1623. fi
  1624. if test -f 'yftest.c' -a "${1}" != "-c" ; then 
  1625.   echo shar: Will not clobber existing file \"'yftest.c'\"
  1626. else
  1627. echo shar: Extracting \"'yftest.c'\" \(939 characters\)
  1628. sed "s/^X//" >'yftest.c' <<'END_OF_FILE'
  1629. X/*- - - - - - - - -yftest -- a program for demoing YAFR - - - - - - - - - -*/
  1630. X
  1631. X#include <exec/types.h>
  1632. X#include <intuition/intuition.h>
  1633. X#include <exec/exec.h>
  1634. X
  1635. Xstruct IntuitionBase *IntuitionBase;
  1636. Xstruct GfxBase *GfxBase;
  1637. X
  1638. Xextern GetFilename();
  1639. X#define CRNT header.current->fib
  1640. X
  1641. Xmain()  /*A temporary main()*/
  1642. X{
  1643. X   char Name[33],Dir[150],Ext[18],CN[183];
  1644. X   UBYTE status;
  1645. X
  1646. X   OpenLibs();
  1647. X
  1648. X   Name[0]=NULL;
  1649. X   strcpy(Dir,"DF0:");
  1650. X   strcpy(Ext,"");
  1651. X   status=GetFilename(Name,Dir,Ext,NULL,32,10,"Enter my filename",NULL,1,3,TRUE);
  1652. X
  1653. X   CloseLibsAndExit();  /*Clean up*/
  1654. X}
  1655. X
  1656. XOpenLibs()
  1657. X{
  1658. X   if((IntuitionBase=(struct IntuitionBase *)
  1659. X         OpenLibrary("intuition.library",0))==NULL)
  1660. X      exit(10);
  1661. X
  1662. X   if((GfxBase=(struct GfxBase *)OpenLibrary("graphics.library",0))==NULL)
  1663. X      {
  1664. X      CloseLibrary(IntuitionBase);
  1665. X      exit(20);
  1666. X      }
  1667. X
  1668. X}
  1669. X
  1670. XCloseLibsAndExit()
  1671. X{
  1672. X   CloseLibrary(GfxBase);
  1673. X   CloseLibrary(IntuitionBase);
  1674. X   exit(0);
  1675. X}
  1676. X
  1677. END_OF_FILE
  1678. if test 939 -ne `wc -c <'yftest.c'`; then
  1679.     echo shar: \"'yftest.c'\" unpacked with wrong size!
  1680. fi
  1681. # end of 'yftest.c'
  1682. fi
  1683. echo shar: End of archive 1 \(of 2\).
  1684. cp /dev/null ark1isdone
  1685. MISSING=""
  1686. for I in 1 2 ; do
  1687.     if test ! -f ark${I}isdone ; then
  1688.     MISSING="${MISSING} ${I}"
  1689.     fi
  1690. done
  1691. if test "${MISSING}" = "" ; then
  1692.     echo You have unpacked both archives.
  1693.     rm -f ark[1-9]isdone
  1694. else
  1695.     echo You still need to unpack the following archives:
  1696.     echo "        " ${MISSING}
  1697. fi
  1698. ##  End of shell archive.
  1699. exit 0
  1700. -- 
  1701. Mail submissions (sources or binaries) to <amiga@cs.odu.edu>.
  1702. Mail comments to the moderator at <amiga-request@cs.odu.edu>.
  1703. Post requests for sources, and general discussion to comp.sys.amiga.
  1704.